<include file="Public/head" />
<link rel="stylesheet" href="__PUBLIC__/webuploader/css/style.css" />
<link rel="stylesheet" href="__PUBLIC__/webuploader/css/demo.css" />
<link rel="stylesheet" href="__PUBLIC__/webuploader/css/webuploader.css" />

<body class="no-skin">
    <include file="Public/header" />
    <div class="main-container" id="main-container">
        <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {}
        </script>
        <include file="Public/sidebar" />
        <div class="main-content">
            <div class="main-content-inner">
                <!-- #section:basics/content.breadcrumbs -->
                <include file="Public/breadcrumbs" />
                <!-- /section:basics/content.breadcrumbs -->
                <div class="page-content">
                    <include file="Public/set" />
                    <div class="alert alert-block alert-success">
                        <button type="button" class="close" data-dismiss="alert">
                            <i class="ace-icon fa fa-times"></i>
                        </button>
                        这是添加商铺的提示。
                    </div>
                    <!-- /section:settings.box -->
                    <div class="row">
                        <div class="col-xs-12">
                            <!-- PAGE CONTENT BEGINS -->
                            <form class="form-horizontal" id="form" role="form" method="post" action="{:U('add')}">
                                <input type="hidden" name="guid" value="{$guid}">
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                        楼层 </label>
                                    <div class="col-sm-9">
                                        <select name="floorid" class="col-xs-10 col-sm-5">
                                            <option value="">请选择楼层</option>
                                            {$floors}
                                        </select>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                        商铺编号 </label>
                                    <div class="col-sm-9">
                                        <div class="clearfix">
                                            <input type="text" name="shopnum" id="shopnum" placeholder="商铺编号" class="col-xs-10 col-sm-5" value="">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-1">
                                        商铺名 </label>
                                    <div class="col-sm-9">
                                        <div class="clearfix">
                                            <input type="text" name="shopname" id="shopname" placeholder="商铺名" class="col-xs-10 col-sm-5" value="">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 电话 </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="tel" id="tel" placeholder="电话" class="col-xs-10 col-sm-5" value="">
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 地址 </label>
                                    <div class="col-sm-9">
                                        <div class="clearfix">
                                            <input type="text" name="address" id="address" placeholder="地址" class="col-xs-10 col-sm-5" value="">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 营业时间 </label>
                                    <div class="col-sm-9">
                                        <div class="input-group col-sm-5 input-daterange">
                                            <input class="input-large form-control timepicker" type="text" name="starttime" id="starttime" placeholder="开始时间">
                                            <span class="input-group-addon"> 到 </span>
                                            <input class="input-large form-control timepicker" type="text" name="endtime" id="endtime" placeholder="结束时间">
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 备注 </label>
                                    <div class="col-sm-9">
                                        <textarea name="summary" id="summary" placeholder="备注" class="col-xs-10 col-sm-5" rows="5"></textarea>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 左logo图 </label>
                                    <div class="col-sm-9">
                                        <div class="input-group col-sm-5">
                                            <!-- start -->
                                            <div class="row">
                                                <div class="col-sm-12 hiduploader">
                                                    <div data-provides="fileinput" data-src="logo-src" data-target="logo" data-url="{:U('/Admin/photo/upload',array('act'=>'shoplogo'))}" class="fileinput image-handle" id="handle-logo">
                                                        <div class="thumbnail">
                                                            <img alt="logo" id="logo-src" src="<empty name='info.logo'>/Public/admin/images/none.png<else/>{$info.logo}</empty>" class="img-reponsetive" id="img-act">
                                                            <input type="hidden" value="{$info.logo}" id="logo" name="logo">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- end -->
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 头部主图 </label>
                                    <div class="col-sm-9">
                                        <div class="input-group col-sm-5">
                                            <!-- start -->
                                            <div class="row">
                                                <div class="col-sm-12 hiduploader">
                                                    <div data-provides="fileinput" data-src="shopMainImg-src" data-target="shopMainImg" data-url="{:U('/Admin/photo/upload',array('act'=>'shopBanner'))}" id="image-handle" class="fileinput image-handle">
                                                        <div class="thumbnail">
                                                            <img alt="头部图片" id="shopMainImg-src" src="/Public/admin/images/none.png" class="img-reponsetive" id="img-act">
                                                            <input type="hidden" value="" id="shopMainImg" name="shopMainImg">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- end -->
                                        </div>
                                    </div>
                                </div>
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 网站描述 </label>
                                    <div class="col-sm-9">
                                        <textarea name="content" id="content" placeholder="网站描述" class="text-editor" rows="5"></textarea>
                                    </div>
                                </div>
                                <!-- 店铺图 -->
                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 店铺图 </label>
                                    <div class="col-sm-9">
                                        <div class="input-group col-sm-12">
                                            <!-- start -->
                                            <div class="page-container">
                                                <div id="uploader" class="wu-example">
                                                    <div class="queueList">
                                                        <div id="dndArea" class="placeholder">
                                                            <div id="filePicker"></div>
                                                            <p>或将照片拖到这里</p>
                                                        </div>
                                                    </div>
                                                    <div class="statusBar" style="display:none">
                                                        <div class="progress">
                                                            <span class="text">0%</span>
                                                            <span class="percentage"></span>
                                                        </div>
                                                        <div class="info"></div>
                                                        <div class="btns">
                                                            <div id="filePicker2"></div>
                                                            <div class="uploadBtn">开始上传</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- end -->
                                        </div>
                                    </div>
                                </div>
                                <!-- 店铺图end -->
                                <div class="col-md-offset-2 col-md-9">
                                    <button class="btn btn-info submit" type="submit"> <i class="icon-ok bigger-110"></i> 提交 </button>
                                    &nbsp; &nbsp; &nbsp;
                                    <a class="btn" href="{:U('index')}"> <i class="icon-undo bigger-110"></i> 返回 </a>
                                </div>
                            </form>
                            <!-- PAGE CONTENT ENDS -->
                        </div>
                        <!-- /.col -->
                    </div>
                    <!-- /.row -->
                </div>
                <!-- /.page-content -->
            </div>
        </div>
        <!-- /.main-content -->
        <include file="Public/footer" />
    </div>
    <!-- /.main-container -->
    <include file="Public/footerjs" />
    <!-- inline scripts related to this page -->
    <script type="text/javascript" src="__PUBLIC__/admin/js/amall/shopset/edit.js"></script>
    <script type="text/javascript" src="__PUBLIC__/webuploader/js/webuploader.min.js"></script>
    <script type="text/javascript">
    window.webuploader = {
        config: {
            thumbWidth: 110, //缩略图宽度，可省略，默认为110
            thumbHeight: 110, //缩略图高度，可省略，默认为110
            wrapId: 'uploader', //必填
        },
        //处理客户端新文件上传时，需要调用后台处理的地址, 必填
        uploadUrl: "{:U('/Admin/Shoppic/fileupload',array('guid'=>$guid))}",
        //处理客户端原有文件更新时的后台处理地址，必填
        updateUrl: "{:U('/Admin/Shoppic/fileupdate',array('guid'=>$guid))}",
        //当客户端原有文件删除时的后台处理地址，必填
        removeUrl: "{:U('/Admin/Shoppic/filedel',array('guid'=>$guid))}",
        //初始化客户端上传文件，从后台获取文件的地址, 可选，当此参数为空时，默认已上传的文件为空
        initUrl: "{:U('/Admin/Shoppic/fileinit', array('guid'=>$guid))}",
    }

    var index = "{:U('index')}";
    </script>
    <script src="__PUBLIC__/webuploader/js/webuploader.js"></script>
    <script type="text/javascript" src="__PUBLIC__/webuploader/js/extend-webuploader.js"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/js/amall/shop/shop.js"></script>
</body>
</html>